<script setup lang='ts'>

import { ref } from 'vue';

type data = {
  id: string
  name: string
  price: number
}

const res = ref<data[]>([
  { id: '1', name: '衣服', price: 100 },
  { id: '2', name: '裤子', price: 300 },
  { id: '3', name: '睡袍', price: 200 },
])

</script>

<template>
  <div>
    <ul>
      <li v-for="item in res" :key="item.id">
        序号为：{{ item.id }}
        物品：{{ item.name }}
        价格：{{ item.price }}
      </li>
    </ul>
  </div>
</template>

<style scoped></style>